import 'package:flutter/material.dart';
import '../../resources/kq_theme_colors.dart';

class KqChartModel {
  ///横坐标文字颜色
  Color? xColor;

  ///纵坐标文字颜色
  Color? yColor;

  ///横坐标文字大小,默认14
  double xFont;

  ///纵坐标文字大小,默认14
  double yFont;

  ///x距离左边距距离,默认40
  double xLeft;

  ///x距离右边距距离,默认0
  double xRight;

  ///y距离上边距距离,默认20
  double yTop;

  ///y距离下边距距离，默认30
  double yBottom;

  ///坐标线颜色
  Color? axisColor;

  ///是否显示分割线
  bool isDivide;

  ///分割线颜色
  Color? dividerColor;

  ///分割线是否为实现，默认为false
  bool hintLineSolid;

  ///是否显示平均线
  bool isAvg;

  ///平均线颜色与折线数组一一对应,若不传则默认为线的颜色
  List<Color>? avgColor;

  ///纵坐标最大值，默认100
  double maxY;

  ///纵个数，默认为6
  int rowCount;

  ///横个数，不传则为内容的个数，传了则固定为几个，间隔数平均
  int crossCount;

  ///是否显示全部的内容文案，默认为false,设为true时isShowClickValue，isShowSlideValue将均无效
  bool isShowValue;

  ///点击时是否显示对应的文案，默认为true
  bool isShowClickValue;

  ///滑动经过对应点时是否显示对应点的文案，默认为true
  bool isShowSlideValue;

  ///画布区域高
  final double sizeHeight;

  ///画布区域宽
  final double sizeWidth;

  ///是否固定最大高度,
  bool isFixMaxY;

  ///动画起始点，默认为0,
  double animationX;

  ///动画时间,默认为3秒
  Duration duration;

  ///是否增加覆盖层默认YES
  bool? isAddMask;

  ///是否曲线绘制默认为false
  bool isCurve;

  ///是否显示内容坐标点,默认为fales
  bool isShowPoint;

  ///内容坐标点的半径
  double pointRadius;

  KqChartModel({
    this.xColor = KqThemeColors.text666,
    this.xFont = 0,
    this.yColor = KqThemeColors.text666,
    this.yFont = 0,
    this.xLeft = 0,
    this.xRight = 0,
    this.yTop = 0,
    this.yBottom = 0,
    this.isDivide = true,
    this.hintLineSolid = false,
    this.axisColor = KqThemeColors.text999,
    this.dividerColor = KqThemeColors.lineColor,
    this.avgColor,
    this.maxY = 100,
    this.rowCount = 6,
    this.crossCount = 0,
    this.isAvg = false,
    this.duration = const Duration(seconds: 3),
    required this.isFixMaxY,
    required this.sizeHeight,
    required this.sizeWidth,
    this.isShowValue = false,
    this.isShowSlideValue = true,
    this.isShowClickValue = true,
    this.animationX = 0,
    this.isAddMask = true,
    this.isCurve = false,
    this.pointRadius = 0,
    this.isShowPoint = false,
  });
}
